package com.doeis.uwork.entity;

import java.sql.Timestamp;

import com.doeis.minaserver.dao.User;
import com.voland.core.annotation.Associate;
import com.voland.core.annotation.Table;
import com.voland.core.db.Entity;
import com.voland.core.validator.NotNull;

@Table(name="item")
public class Item extends Entity {

	private String id;
	private String user_id; //条款所属人
	private String switchboard_id;
	
	@NotNull(message="元素不能为空")
	private String user_product_id;
	private String product_id;
	
	@NotNull(message="指数名称不能为空")
	private String item_name;
	private String item_describe;
	//@NotNull(message="指数符号不能为空")
	private String item_sign;
	
	private Double warning;
	private Integer effective;
	private Integer data_source;
	private String source_id;
	private String source_field;
	private Integer sort_num;
	private Timestamp updated_at;
	private Integer scope;
	private String attrs;
	private Integer segment;
	private Boolean auto_copy;
//	private Boolean shared;
	private String shared_item_id;
	private String original_item_id;
	private Boolean is_from_vps;
	private String vps_key;
	private String source_table;
	private String source_status;
	private Boolean is_top;
	private Boolean show_formula;
	private Boolean show_note;//是否能查看我的心得
	private String creator;//创建者
//	private Boolean shared_out;//是否共享到外部
	private String shared_out_item_id;//共享到外部后的item_id
	
	private Boolean status;//删除状态
	
	@Associate(fk="user_id")
	private User itemUser;
	@Associate(fk="creator")
	private User creatorUser;
	
	@Associate	
	private String productName;
	@Associate
	private String user_name;
	
	@Associate
	private Integer originalData_source;
	
	
//	public Boolean getShared_out() {
//		return shared_out;
//	}
//	public Boolean getShared() {
//		return shared;
//	}
	
	public String getUser_name() {
		return user_name;
	}
	public void setUser_name(String user_name) {
		this.user_name = user_name;
	}
	public Boolean getShow_formula() {
		return show_formula;
	}
	public void setShow_formula(Boolean show_formula) {
		this.show_formula = show_formula;
	}
	public Boolean getShow_note() {
		return show_note;
	}
	
	public String getCreator() {
		return creator;
	}
	public void setCreator(String creator) {
		this.creator = creator;
	}
	public User getCreatorUser() {
		return creatorUser;
	}
	public void setCreatorUser(User creatorUser) {
		this.creatorUser = creatorUser;
	}
	public void setShow_note(Boolean show_note) {
		this.show_note = show_note;
	}
	public String getSource_table() {
		return source_table;
	}
	public void setSource_table(String source_table) {
		this.source_table = source_table;
	}
	public String getSource_status() {
		return source_status;
	}
	public void setSource_status(String source_status) {
		this.source_status = source_status;
	}

	public String getId(){
		return id;
	}
	public void setId(String id){
		this.id = id;
	}

	public String getUser_id(){
		return user_id;
	}
	public void setUser_id(String user_id){
		this.user_id = user_id;
	}

	public String getSwitchboard_id(){
		return switchboard_id;
	}
	public void setSwitchboard_id(String switchboard_id){
		this.switchboard_id = switchboard_id;
	}

	public String getUser_product_id(){
		return user_product_id;
	}
	public void setUser_product_id(String user_product_id){
		this.user_product_id = user_product_id;
	}

	public String getProduct_id(){
		return product_id;
	}
	public void setProduct_id(String product_id){
		this.product_id = product_id;
	}

	public String getItem_name(){
		return item_name;
	}
	public void setItem_name(String item_name){
		this.item_name = item_name;
	}

	public String getItem_describe(){
		return item_describe;
	}
	public void setItem_describe(String item_describe){
		this.item_describe = item_describe;
	}

	public String getItem_sign(){
		return item_sign;
	}
	public void setItem_sign(String item_sign){
		this.item_sign = item_sign;
	}

	public Double getWarning(){
		return warning;
	}
	public void setWarning(Double warning){
		this.warning = warning;
	}

	public Integer getEffective() {
		return effective;
	}
	public void setEffective(Integer effective) {
		this.effective = effective;
	}
	
	public Integer getData_source(){
		return data_source;
	}
	
	public Boolean getIs_top() {
		return is_top;
	}
	public void setIs_top(Boolean is_top) {
		this.is_top = is_top;
	}
	public void setData_source(Integer data_source){
		this.data_source = data_source;
	}

	public String getSource_id(){
		return source_id;
	}
	public void setSource_id(String source_id){
		this.source_id = source_id;
	}

	public String getSource_field(){
		return source_field;
	}
	public void setSource_field(String source_field){
		this.source_field = source_field;
	}

	public Integer getSort_num(){
		return sort_num;
	}
	public void setSort_num(Integer sort_num){
		this.sort_num = sort_num;
	}

	public Timestamp getUpdated_at(){
		return updated_at;
	}
	public void setUpdated_at(Timestamp updated_at){
		this.updated_at = updated_at;
	}

	
	public Integer getScope(){
		return scope;
	}
	public void setScope(Integer scope){
		this.scope = scope;
	}

	public String getAttrs(){
		return attrs;
	}
	public void setAttrs(String attrs){
		this.attrs = attrs;
	}

	public Integer getSegment(){
		return segment;
	}
	public void setSegment(Integer segment){
		this.segment = segment;
	}

	public User getItemUser() {
		return itemUser;
	}
	public void setItemUser(User itemUser) {
		this.itemUser = itemUser;
	}
	public Boolean getAuto_copy() {
		return auto_copy;
	}
	public void setAuto_copy(Boolean auto_copy) {
		this.auto_copy = auto_copy;
	}
	
	
	
	public Boolean getIs_from_vps() {
		return is_from_vps;
	}
	public void setIs_from_vps(Boolean is_from_vps) {
		this.is_from_vps = is_from_vps;
	}
	public String getVps_key() {
		return vps_key;
	}
	public void setVps_key(String vps_key) {
		this.vps_key = vps_key;
	}
	
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}
	
//	public void setShared(Boolean shared) {
//		this.shared = shared;
//	}
//	
	public String getShared_item_id() {
		return shared_item_id;
	}
	public void setShared_item_id(String shared_item_id) {
		this.shared_item_id = shared_item_id;
	}
	
	public String getOriginal_item_id() {
		return original_item_id;
	}
	public void setOriginal_item_id(String original_item_id) {
		this.original_item_id = original_item_id;
	}
	
	public Integer getOriginalData_source() {
		return originalData_source;
	}
	public void setOriginalData_source(Integer originalData_source) {
		this.originalData_source = originalData_source;
	}
	public String getShared_out_item_id() {
		return shared_out_item_id;
	}
	public void setShared_out_item_id(String shared_out_item_id) {
		this.shared_out_item_id = shared_out_item_id;
	}
	
	public Boolean getStatus() {
		return status;
	}
	public void setStatus(Boolean status) {
		this.status = status;
	}
	
	@Override
	public String toString() {
		return "Item [id=" + id + ", user_id=" + user_id + ", switchboard_id="
				+ switchboard_id + ", user_product_id=" + user_product_id
				+ ", product_id=" + product_id + ", item_name=" + item_name
				+ ", item_describe=" + item_describe + ", item_sign="
				+ item_sign + ", warning=" + warning + ", effective="
				+ effective + ", data_source=" + data_source + ", source_id="
				+ source_id + ", source_field=" + source_field + ", sort_num="
				+ sort_num + ", updated_at=" + updated_at + ", scope=" + scope
				+ ", attrs=" + attrs + ", segment=" + segment + ", auto_copy="
				+ auto_copy +  ", shared_item_id="
				+ shared_item_id + ", original_item_id=" + original_item_id
				+ ", is_from_vps=" + is_from_vps + ", vps_key=" + vps_key
				+ ", source_table=" + source_table + ", source_status="
				+ source_status + ", is_top=" + is_top + ", itemUser="
				+ itemUser + ", userProduct=" + productName + ",originalData_source="+originalData_source+"]";
	}
	
}